﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhouYu.DreamTour.BLL.IService;
using ZhouYu.DreamTour.DAL.IRepository;
using ZhouYu.DreamTour.ViewModel;

namespace ZhouYu.DreamTour.BLL.Service
{
    public class FoodService:IFoodService
    {
        private IFoodRepository _foodRepository;
        public FoodService(IFoodRepository foodRepository)
        {
            _foodRepository = foodRepository;
        }

        /// <summary>
        /// 获取餐饮页面信息
        /// </summary>
        /// <returns></returns>
        public ResponseResult GetCaterAccommodsInfo()
        {
            //创建响应结果类对象
            ResponseResult responseResult = new ResponseResult();
            //调用获取餐饮页面信息
            responseResult.data = _foodRepository.GetCaterAccommodsInfo();
            return responseResult;
        }


        /// <summary>
        /// 根据Id获取餐饮详情
        /// </summary>
        /// <returns></returns>
        public ResponseResult GetCaterAccommodsInfoById(int CaterId)
        {
            //创建响应结果类对象
            ResponseResult responseResult = new ResponseResult();
            //调用根据Id获取餐饮详情
            responseResult.data = _foodRepository.GetCaterAccommodsInfoById(CaterId);
            return responseResult;
        }




    }
}
